﻿@using Models;
@model MvcPager.Page<player>
@{
    ViewBag.Title = "_Index";
}
<table class="table-default">
    <thead>
        <tr>
            <td class="width-150">编号</td>
            <td class="width-150">姓名</td>
            <td class="width-150">平均分</td>
            <td class="width-300">操作</td>
        </tr>
    </thead>
    <tbody>
        @if (Model.PageList != null && Model.PageList.Count > 0)
        {
            foreach (var item in Model.PageList)
            {
                <tr class="ajax-item">
                    <td>@(item.sort + "号")</td>
                    <td>@item.name</td>
                    <td>@item.TotalScoreStr</td>
                    <td>
                        <ul class="control-ul control-ul-4">
                            <li>
                                <a href="javascript:void(0);" onclick="AjaxOpenOrClose(this)" data-id="@item.id" data-isopen="@item.isopen" title="开启或关闭评分">
                                    @if (item.isopen)
                                    {
                                        <i class="fa fa-close"></i><span>关闭评分</span>
                                    }
                                    else
                                    {
                                        <i class="fa fa-check"></i><span>开启评分</span>
                                    }
                                </a>
                            </li>
                            <li>
                                <a href="/admin/player/exportbyplayer?id=@item.id">
                                    <i class="fa fa-download"></i><span>导出数据</span>
                                </a>
                            </li>
                            <li>
                                <a href="/admin/player/edit?id=@item.id">
                                    <i class="fa fa-pencil"></i><span>编辑</span>
                                </a>
                            </li>
                            <li>
                                <a href="javascript:void(0);" onclick="ajaxdelete(this)" data-url="/admin/player/delete?id=@item.id">
                                    <i class="fa fa-trash"></i><span>删除</span>
                                </a>
                            </li>
                        </ul>

                    </td>
                </tr>
            }
        }
    </tbody>
</table>
@{Html.RenderPartial("_Pager", Model);}